
<!doctype html>
<html>
<head>
    <meta charset="UTF-8">
    <title>{$config.site_title}</title>
    <meta name="renderer" content="webkit|ie-comp|ie-stand">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width,user-scalable=yes, minimum-scale=0.4, initial-scale=0.8,target-densitydpi=low-dpi" />
    <meta http-equiv="Cache-Control" content="no-siteapp" />

    <link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" />
    <link rel="stylesheet" href="__ADMIN__/css/font.css">
    <link rel="stylesheet" href="__ADMIN__/css/xadmin.css">
    <script type="text/javascript" src="https://cdn.bootcss.com/jquery/3.2.1/jquery.min.js"></script>
    <script src="__ADMIN__/lib/layui/layui.js" charset="utf-8"></script>
    <script type="text/javascript" src="__ADMIN__/js/xadmin.js"></script>
    <style>
        #admin-theme-setting{
            cursor: pointer;
            display: inline-block;
            line-height: 45px;
            vertical-align: middle;
        }
    </style>
</head>
<body class="app-theme-{$config.site_theme}">
<!-- 顶部开始 -->
<div class="container" >
    <div class="logo"><a href="./index.html">{$config.site_name} 后台管理</a></div>
    <div class="left_open">
        <i title="展开左侧栏" class="iconfont">&#xe699;</i>
    </div>
    <ul class="layui-nav right" lay-filter="">
        <li class="" id="admin-theme-setting"><i class="iconfont">&#xe761;</i></li>
        <li class="layui-nav-item">
            <a href="javascript:;">{$info.nickname}</a>
            <dl class="layui-nav-child"> <!-- 二级菜单 -->
                <dd><a onclick="x_admin_show('个人信息','/admin/admin/info',500,430)">个人信息</a></dd>
                <dd><a href="{:url('quit')}">退出</a></dd>
            </dl>
        </li>
        <li class="layui-nav-item to-index"><a href="/">前台首页</a></li>
    </ul>

</div>
<!-- 顶部结束 -->
<!-- 中部开始 -->
<!-- 左侧菜单开始 -->
<div class="left-nav">
    <div id="side-nav">
        <ul id="nav">
            {foreach $menu as $v}
                {if $v._child}
                <li>
                    <a href="javascript:;">
                        <i class="iconfont">{:html_entity_decode('&'.$v.icon)}</i>
                        <cite>{$v.title}</cite>
                        <i class="iconfont nav_right">&#xe697;</i>
                    </a>
                    <ul class="sub-menu">
                        {foreach $v._child as $vo}
                        {if $vo._child}
                        <li>
                            <a href="javascript:;">
                                <i class="iconfont">{:html_entity_decode('&'.$vo.icon)}</i>
                                <cite>{$vo.title}</cite>
                                <i class="iconfont nav_right">&#xe697;</i>
                            </a>
                            <ul class="sub-menu">
                                {foreach $vo._child as $vi}
                                <li>
                                    <a _href="{:request()->module()}/{$vi.controller}/{$vi.methods}">
                                        <i class="iconfont">{:html_entity_decode('&'.$vi.icon)}</i>
                                        <cite>{$vi.title}</cite>
                                    </a>
                                </li>
                                {/foreach}
                            </ul>
                        </li>
                        {else /}
                        <li>
                            <a _href="{:request()->module()}/{$vo.controller}/{$vo.methods}">
                                <i class="iconfont">{:html_entity_decode('&'.$vo.icon)}</i>
                                <cite>{$vo.title}</cite>
                            </a>
                        </li>
                        {/if}
                        {/foreach}
                    </ul>
                </li>
                {else /}
                <li>
                    <a _href="{:request()->module()}/{$v.controller}/{$v.methods}">
                        <i class="iconfont">{:html_entity_decode('&'.$v.icon)}</i>
                        <cite>{$v.title}</cite>
                        <i class="iconfont nav_right">&#xe697;</i>
                    </a>
                </li>
                {/if}
            {/foreach}

        </ul>
    </div>
</div>
<!-- <div class="x-slide_left"></div> -->
<!-- 左侧菜单结束 -->
<!-- 右侧主体开始 -->
<div class="page-content">
    <div class="layui-tab tab" lay-filter="xbs_tab" lay-allowclose="false">
        <ul class="layui-tab-title">
            <li class="home"><i class="layui-icon">&#xe68e;</i>我的桌面</li>
        </ul>
        <div class="layui-tab-content">
            <div class="layui-tab-item layui-show">
                <iframe src='{:url("main")}' frameborder="0" scrolling="yes" class="x-iframe"></iframe>
            </div>
        </div>
    </div>
</div>
<div class="page-content-bg"></div>
<!-- 右侧主体结束 -->
<!-- 中部结束 -->
<!-- 底部开始 -->
<div class="footer">
    <div class="copyright">Copyright ©{:date('Y')} {$config.site_name} v2.0 All Rights Reserved</div>
</div>
<script type="text/html" id="themes">
    <ul class="ltpy-themes">
        <li data-theme="0" class="ltpy-theme-item-0"></li>
        <li data-theme="1" class="ltpy-theme-item-1"></li>
        <li data-theme="2" class="ltpy-theme-item-2"></li>
        <li data-theme="3" class="ltpy-theme-item-3"></li>
        <li data-theme="4" class="ltpy-theme-item-4"></li>
        <li data-theme="5" class="ltpy-theme-item-5"></li>
        <li data-theme="6" class="ltpy-theme-item-6"></li>
        <li data-theme="7" class="ltpy-theme-item-7"></li>
        <li data-theme="8" class="ltpy-theme-item-8"></li>
        <li data-theme="9" class="ltpy-theme-item-9"></li>
        <li data-theme="10" class="ltpy-theme-item-10"></li>
    </ul>
</script>
<!-- 底部结束 -->
</body>
</html>
<script>
    $('#admin-theme-setting').on('click',function () {
        layer.open({
            type: 1,
            area: ['300px', '90%'], //宽高
            offset: 'rb',
            shadeClose:true,
            content: $('#themes').html()
        });
        $('body .ltpy-themes li').on('click',function () {
            var theme = $(this).attr('data-theme');
            var load = layer.load(1);
            $.post("{:url('system/index')}",{
                site_theme:theme
            },function (res) {
                layer.close(load);
                $('body').attr('class','app-theme-'+theme)
            });
        })
    })
</script>
<script>
    var request = window.indexedDB.open('test',1);
    request.onsuccess = function (event) {
        console.log(event)
        console.log(request)
    }
</script>